<template>
  <view class="pullWatchScroll" v-on:click.prevent.self>
    <iframe
      frameborder="no"
      border="0"
      marginwidth="0"
      marginheight="0"
      scrolling="no"
      allowtransparency="yes"
      hspace="0"
      vspace="0"
      :src="watchSrc"
      width="80%"
      height="100%"
      allowfullscreen
      style="margin-left: 7%;"
    ></iframe>
  </view>
</template>

<script>
export default {
  data() {
    return {
      watchSrc: ''
    };
  },
  onLoad() {
    const option = uni.getStorageSync('watchInfo');
    uni.setNavigationBarTitle({
      title: option.name
    });
    this.watchSrc = option.url;
  },
  onUnload() {
    uni.removeStorageSync('watchInfo');
  },
  onBackPress(e) {
    uni.switchTab({
      url: '/pages/watch/watch'
    });
    return true; // 此处一定要return为true，否则页面不会返回到指定路径
  },
  methods: {}
};
</script>

<style>
.pullWatchScroll {
  transform: rotate(90deg);
  height: 100vw;
  width: 100vh;
  transform-origin: 0% 100%;
  top: -100vw;
  position: relative;
}
iframe {
  pointer-events: none;
}
</style>
